// 注册的类型集合
var classTypes = $create(null);


// 定义命名类
function defineClass(name, superclass, classCodeFn, Class) {

    var prototype = (Class = superclass.extend(classCodeFn, Class)).prototype;
    var lowerCaseName = prototype.lowerTypeName = name.toLowerCase();
    var $class = prototype.$class;

    Class.typeName = prototype.typeName = name;
    classTypes[lowerCaseName] = Class;

    if (name !== lowerCaseName)
    {
        yaxi[name] = Class;
    }

    if (typeof $class === 'string')
    {
        prototype.$class = $class ? $class + ' yx-' + lowerCaseName : 'yx-' + lowerCaseName;
    }

    return Class;
}

